/* 状态管理 */
function useState() {
  const disabledbtn = ref(false);
  const loading = ref(false);

  /* 切换状态 */
  function toggleState(state: boolean) {
    disabledbtn.value = state;
    loading.value = state;
  }

  return {
    disabledbtn,
    loading,
    toggleState
  };
}

export { useState };
